﻿using System;
using System.Diagnostics;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input.Touch;
using GauntletFramework.Input;

namespace GauntletFramework.StateManagment.Menu.Menus
{
    class SoundOptionMenu : MenuState
    {
        public override bool StartTransition { get { return true; } }
        public override bool EndTransition { get { return true; } }
        MenuScrollBar Sound, Music;
        public SoundOptionMenu()
        {
            StaticGame.StateStack.TransitionType = TransitionType.SlideRight;
            Background = GauntletFramework.Texture.Gradiant.OutwardGradiant(Game.GraphicsDevice, Color.DarkViolet, Color.Black);

            MenuItems.Add(new MenuItem(MenuState.MenuFont, "Back", "action back once", new Vector2(100, 50)));
            MenuItems.Add(Sound = new MenuScrollBar(MenuState.MenuFont, "Sound Volume", new Vector2(100, 100), Settings.SoundVolume));
            MenuItems.Add(Music = new MenuScrollBar(MenuState.MenuFont, "Music Volume", new Vector2(100, 150), Settings.MusicVolume));
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            Settings.SoundVolume = Sound.ScrollValue;
            Settings.MusicVolume = Music.ScrollValue;
        }
    }
}
